4 Lecture
CS302
Midterm & Final Term Short Notes
NUMBER SYSTEMS & CODES
Number systems are ways to represent numerical values using symbols. The most common number systems are decimal, binary, octal, and hexadecimal. Codes are systems that encode information using symbols, such as the ASCII code for representing cha
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
Which number system is commonly used in digital electronics? a) Decimal b) Binary c) Octal d) Hexadecimal Answer: b) Binary
What is the base of the hexadecimal number system? a) 2 b) 8 c) 10 d) 16 Answer: d) 16
What is the decimal equivalent of the binary number 101101? a) 41 b) 45 c) 53 d) 59 Answer: d) 59
Which of the following is a BCD code for the decimal number 3? a) 0010 b) 0100 c) 0011 d) 0101 Answer: b) 0100
What is the excess-3 code for the decimal number 5? a) 1000 b) 1010 c) 1100 d) 1110 Answer: d) 1110
Which of the following is the most compact representation of the number 255 in binary? a) 11111111 b) 11111110 c) 11111101 d) 11111100 Answer: a) 11111111
Which code is used to represent alphanumeric characters in a computer? a) ASCII b) BCD c) Gray d) Excess-3 Answer: a) ASCII
What is the octal equivalent of the binary number 101010? a) 22 b) 42 c) 52 d) 62 Answer: b) 42
Which of the following is a Gray code for the binary number 1001? a) 1100 b) 1110 c) 1111 d) 1011 Answer: d) 1011
What is the decimal equivalent of the octal number 77? a) 56 b) 63 c) 70 d) 73 Answer: b) 63
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
What is a number system? Answer: A number system is a way to represent numerical values using symbols. Examples of number systems include decimal, binary, octal, and hexadecimal.
What is binary code? Answer: Binary code is a system of representing data using only two symbols, typically 0 and 1. Binary code is commonly used in digital electronics and computing.
What is the difference between a digital signal and an analog signal? Answer: A digital signal is a discrete signal that only has specific, discrete values, such as 0 or 1. An analog signal is a continuous signal that can have any value within a certain range.
What is the purpose of a code in digital electronics? Answer: Codes are used to represent information using symbols, such as binary codes for representing data in a computer. Codes can also be used for error detection and correction.
What is an excess-3 code? Answer: An excess-3 code is a binary code that adds 3 to the decimal value of a number before encoding it in binary. This code is used for BCD arithmetic.
What is the difference between BCD and binary codes? Answer: BCD codes are a type of binary code that represents each decimal digit using a 4-bit binary code. Binary codes, on the other hand, can represent any numerical value using a combination of 0 and 1.
What is a Gray code? Answer: A Gray code is a binary code in which only one bit changes between consecutive numbers. Gray codes are used in digital circuits for reducing the likelihood of errors during transitions between values.
What is the purpose of a parity bit in a code? Answer: A parity bit is used for error detection in codes. The parity bit is set to either 0 or 1 depending on whether the number of 1 bits in the code is even or odd.
What is the purpose of a radix point in a number system? Answer: A radix point is used to separate the integer part and the fractional part of a number in a number system. The radix point is typically represented by a decimal point in the decimal system, a binary point in the binary system, and so on.
What is the significance of the base of a number system? Answer: The base of a number system determines the number of symbols used to represent a value. For example, the binary system has a base of 2 and uses only two symbols, 0 and 1, to represent numerical values.